﻿using Model.BusinessModel.OutPut.sys;
using Model.DomainModel.Sys;

namespace Infrastructure.IRepository.Sys
{

    /// <summary>
    /// 按钮仓储接口
    /// </summary>
    public interface ISysButtonRepository : IRepository<SysButton>
    {
        /// <summary>
        /// 根据菜单id获取按钮
        /// </summary>
        /// <param name="menuId">菜单id</param>
        /// <returns>返回对应按钮集合</returns>
        List<SysButtonDataOutPut> GetButtonByMenuId(string menuId);

        /// <summary>
        /// 根据按钮id获取数据
        /// </summary>
        /// <param name="buttonIds">按钮id集合</param>
        /// <returns>返回对应按钮集合</returns>
        List<SysButton> GetButtonByButtonId(List<string> buttonIds);

        /// <summary>
        /// 获取公司系统按钮数据
        /// </summary>
        /// <param name="corporationKey">公司key</param>
        /// <param name="systemKey">系统key</param>
        /// <param name="buttonRoleType">按钮类型</param>
        /// <returns></returns>
        List<SysButtonDataOutPut> GetCorporationSystemButtonList(string corporationKey, string systemKey, int buttonRoleType);

        /// <summary>
        /// 根据菜单id获取按钮及样式
        /// </summary>
        /// <param name="menuId">菜单id</param>
        /// <returns>返回对应按钮集合</returns>
        List<SysButtonDataOutPut> GetButtonStyleByMenuId(string menuId);

        /// <summary>
        /// 更新按钮绑定数据规则
        /// </summary>
        /// <param name="buttonIds">按钮id集合</param>
        /// <param name="ruleId">数据规则id</param>
        void UpdataRuleIdByButtonId(List<string> buttonIds, string ruleId);

        /// <summary>
        /// 根据规则id,清空按钮规则
        /// </summary>
        /// <param name="ruleId">数据规则id</param>
        void ClearButtonRule(string ruleId);
    }
}
